macOS: re-add deprecated notification API#2997
Conversation
|
I dont see the point in relying on an API we know is going to be |
|
Ok, I'm fine with not having this in Big Sur. Is it possible to query |
|
You could just try to compile a small dynamically generated .m file and link with th framework, if it succeeds, use it, if not, use the older API. This is how configure traditionally works. |
89cccda to
13d7478
Compare
6eab3ef to
4d57d53
Compare
The new User Notifications Framework is only available on macOS 10.14 and above, while the old NSUserNotification API is deprecated in macOS 11 (Big Sur) and will probably be removed in the future. This commit compiles a simple test program to see if the Framework is available and then uses either the new or the old API.
4d57d53 to
0ae1f99
Compare
|
Please review. |
|
These were all the commits I wanted to add before the next release. Thank you for waiting a couple days with the release, it will make it much easier for me to update the kitty package for nix. You may now release the next version if you like. |
Please don't merge this yet.
This PR adds the deprecated macOS notification API again, so that notifications work when compiling from source without code signing. It was removed in 4e3c6e5.
What did you mean by "compile time version detection" in #2876 (comment)? Simply check if the macOS version is 10.15 (Catalina) or lower and then use the old API? But I think it would be useful to be able to use this API as long as it's still only deprecated and not removed. Do you have an idea, how this could be done best?